home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / IntlResources.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  13KB  |  357 lines

  1. /*
  2.      File:        IntlResources.h
  3.  
  4.      Contains:    International Resource definitions.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __INTLRESOURCES__
  19. #define __INTLRESOURCES__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28.  
  29. #if PRAGMA_IMPORT_SUPPORTED
  30. #pragma import on
  31. #endif
  32.  
  33. #if PRAGMA_ALIGN_SUPPORTED
  34. #pragma options align=mac68k
  35. #endif
  36.  
  37.  
  38. enum {
  39.                                                                 /* Bits in the itlcFlags byte */
  40.     itlcShowIcon                = 7,                            /*Show icon even if only one script*/
  41.     itlcDualCaret                = 6,                            /*Use dual caret for mixed direction text*/
  42.                                                                 /* Bits in the itlcSysFlags word */
  43.     itlcSysDirection            = 15,                            /*System direction - left to right/right to left*/
  44.     tokLeftQuote                = 1,                            /* NumberParts.data[] enumerators                                             */
  45.     tokRightQuote                = 2,                            /*  In general, these are NOT to be considered indices into the data[] array */
  46.     tokLeadPlacer                = 3,
  47.     tokLeader                    = 4,
  48.     tokNonLeader                = 5,
  49.     tokZeroLead                    = 6,
  50.     tokPercent                    = 7,
  51.     tokPlusSign                    = 8,
  52.     tokMinusSign                = 9,
  53.     tokThousands                = 10,
  54.     tokReserved                    = 11,                            /* 11 is reserved field */
  55.     tokSeparator                = 12,
  56.     tokEscape                    = 13,
  57.     tokDecPoint                    = 14,
  58.     tokEPlus                    = 15,
  59.     tokEMinus                    = 16,
  60.     tokMaxSymbols                = 31,
  61.     curNumberPartsVersion        = 1                                /*current version of NumberParts record*/
  62. };
  63.  
  64.  
  65. enum {
  66.     currSymLead                    = 16,
  67.     currNegSym                    = 32,
  68.     currTrailingZ                = 64,
  69.     currLeadingZ                = 128
  70. };
  71.  
  72.  
  73. enum {
  74.     mdy                            = 0,
  75.     dmy                            = 1,
  76.     ymd                            = 2,
  77.     myd                            = 3,
  78.     dym                            = 4,
  79.     ydm                            = 5
  80. };
  81.  
  82. typedef SInt8 DateOrders;
  83.  
  84. enum {
  85.     timeCycle24                    = 0,                            /*time sequence 0:00 - 23:59*/
  86.     timeCycleZero                = 1,                            /*time sequence 0:00-11:59, 0:00 - 11:59*/
  87.     timeCycle12                    = 255,                            /*time sequence 12:00 - 11:59, 12:00 - 11:59*/
  88.     zeroCycle                    = 1,                            /*old name for timeCycleZero*/
  89.     longDay                        = 0,                            /*day of the month*/
  90.     longWeek                    = 1,                            /*day of the week*/
  91.     longMonth                    = 2,                            /*month of the year*/
  92.     longYear                    = 3,                            /*year*/
  93.     supDay                        = 1,                            /*suppress day of month*/
  94.     supWeek                        = 2,                            /*suppress day of week*/
  95.     supMonth                    = 4,                            /*suppress month*/
  96.     supYear                        = 8,                            /*suppress year*/
  97.     dayLdingZ                    = 32,
  98.     mntLdingZ                    = 64,
  99.     century                        = 128,
  100.     secLeadingZ                    = 32,
  101.     minLeadingZ                    = 64,
  102.     hrLeadingZ                    = 128
  103. };
  104.  
  105. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  106. #endif
  107. /* move OffsetTable to QuickdrawText */
  108. struct Intl0Rec {
  109.     char                             decimalPt;                    /*decimal point character*/
  110.     char                             thousSep;                    /*thousands separator character*/
  111.     char                             listSep;                    /*list separator character*/
  112.     char                             currSym1;                    /*currency symbol*/
  113.     char                             currSym2;
  114.     char                             currSym3;
  115.     UInt8                             currFmt;                    /*currency format flags*/
  116.     UInt8                             dateOrder;                    /*order of short date elements: mdy, dmy, etc.*/
  117.     UInt8                             shrtDateFmt;                /*format flags for each short date element*/
  118.     char                             dateSep;                    /*date separator character*/
  119.     UInt8                             timeCycle;                    /*specifies time cycle: 0..23, 1..12, or 0..11*/
  120.     UInt8                             timeFmt;                    /*format flags for each time element*/
  121.     char                             mornStr[4];                    /*trailing string for AM if 12-hour cycle*/
  122.     char                             eveStr[4];                    /*trailing string for PM if 12-hour cycle*/
  123.     char                             timeSep;                    /*time separator character*/
  124.     char                             time1Suff;                    /*trailing string for AM if 24-hour cycle*/
  125.     char                             time2Suff;
  126.     char                             time3Suff;
  127.     char                             time4Suff;
  128.     char                             time5Suff;                    /*trailing string for PM if 24-hour cycle*/
  129.     char                             time6Suff;
  130.     char                             time7Suff;
  131.     char                             time8Suff;
  132.     UInt8                             metricSys;                    /*255 if metric, 0 if inches etc.*/
  133.     short                             intl0Vers;                    /*region code (hi byte) and version (lo byte)*/
  134. };
  135. typedef struct Intl0Rec Intl0Rec;
  136.  
  137. typedef Intl0Rec *Intl0Ptr;
  138. typedef Intl0Ptr *Intl0Hndl;
  139. struct Intl1Rec {
  140.     Str15                             days[7];                    /*day names*/
  141.     Str15                             months[12];                    /*month names*/
  142.     UInt8                             suppressDay;                /*255 for no day, or flags to suppress any element*/
  143.     UInt8                             lngDateFmt;                    /*order of long date elements*/
  144.     UInt8                             dayLeading0;                /*255 for leading 0 in day number*/
  145.     UInt8                             abbrLen;                    /*length for abbreviating names*/
  146.     char                             st0[4];                        /*separator strings for long date format*/
  147.     char                             st1[4];
  148.     char                             st2[4];
  149.     char                             st3[4];
  150.     char                             st4[4];
  151.     short                             intl1Vers;                    /*region code (hi byte) and version (lo byte)*/
  152.     short                             localRtn[1];                /*now a flag for opt extension*/
  153. };
  154. typedef struct Intl1Rec Intl1Rec;
  155.  
  156. typedef Intl1Rec *Intl1Ptr;
  157. typedef Intl1Ptr *Intl1Hndl;
  158. /*fields for optional itl1 extension*/
  159. struct Itl1ExtRec {
  160.     Intl1Rec                         base;                        /*un-extended Intl1Rec*/
  161.     short                             version;
  162.     short                             format;
  163.     short                             calendarCode;                /*calendar code for this itl1 resource*/
  164.     long                             extraDaysTableOffset;        /*offset in itl1 to extra days table*/
  165.     long                             extraDaysTableLength;        /*length of extra days table*/
  166.     long                             extraMonthsTableOffset;        /*offset in itl1 to extra months table*/
  167.     long                             extraMonthsTableLength;        /*length of extra months table*/
  168.     long                             abbrevDaysTableOffset;        /*offset in itl1 to abbrev days table*/
  169.     long                             abbrevDaysTableLength;        /*length of abbrev days table*/
  170.     long                             abbrevMonthsTableOffset;    /*offset in itl1 to abbrev months table*/
  171.     long                             abbrevMonthsTableLength;    /*length of abbrev months table*/
  172.     long                             extraSepsTableOffset;        /*offset in itl1 to extra seps table*/
  173.     long                             extraSepsTableLength;        /*length of extra seps table*/
  174.     short                             tables[1];                    /*now a flag for opt extension*/
  175. };
  176. typedef struct Itl1ExtRec Itl1ExtRec;
  177.  
  178. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  179. #endif
  180. struct UntokenTable {
  181.     short                             len;
  182.     short                             lastToken;
  183.     short                             index[256];                    /*index table; last = lastToken*/
  184. };
  185. typedef struct UntokenTable UntokenTable;
  186.  
  187. typedef UntokenTable *UntokenTablePtr;
  188. typedef UntokenTablePtr *UntokenTableHandle;
  189. union WideChar {
  190.     char                             a[2];                        /*0 is the high order character*/
  191.     short                             b;
  192. };
  193. typedef union WideChar WideChar;
  194.  
  195. struct WideCharArr {
  196.     short                             size;
  197.     WideChar                         data[10];
  198. };
  199. typedef struct WideCharArr WideCharArr;
  200.  
  201. struct NumberParts {
  202.     short                             version;
  203.     WideChar                         data[31];                    /*index by [tokLeftQuote..tokMaxSymbols]*/
  204.     WideCharArr                     pePlus;
  205.     WideCharArr                     peMinus;
  206.     WideCharArr                     peMinusPlus;
  207.     WideCharArr                     altNumTable;
  208.     char                             reserved[20];
  209. };
  210. typedef struct NumberParts NumberParts;
  211.  
  212. typedef NumberParts *NumberPartsPtr;
  213. struct Itl4Rec {
  214.     short                             flags;                        /*reserved*/
  215.     long                             resourceType;                /*contains 'itl4'*/
  216.     short                             resourceNum;                /*resource ID*/
  217.     short                             version;                    /*version number*/
  218.     long                             resHeader1;                    /*reserved*/
  219.     long                             resHeader2;                    /*reserved*/
  220.     short                             numTables;                    /*number of tables, one-based*/
  221.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  222.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  223.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  224.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  225.     long                             defPartsOffset;                /*offset to default number parts table*/
  226.     long                             resOffset6;                    /*reserved*/
  227.     long                             resOffset7;                    /*reserved*/
  228.     long                             resOffset8;                    /*reserved*/
  229. };
  230. typedef struct Itl4Rec Itl4Rec;
  231.  
  232. typedef Itl4Rec *Itl4Ptr;
  233. typedef Itl4Ptr *Itl4Handle;
  234. /* New NItl4Rec for System 7.0: */
  235. struct NItl4Rec {
  236.     short                             flags;                        /*reserved*/
  237.     long                             resourceType;                /*contains 'itl4'*/
  238.     short                             resourceNum;                /*resource ID*/
  239.     short                             version;                    /*version number*/
  240.     short                             format;                        /*format code*/
  241.     short                             resHeader;                    /*reserved*/
  242.     long                             resHeader2;                    /*reserved*/
  243.     short                             numTables;                    /*number of tables, one-based*/
  244.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  245.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  246.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  247.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  248.     long                             defPartsOffset;                /*offset to default number parts table*/
  249.     long                             whtSpListOffset;            /*offset to white space code list*/
  250.     long                             resOffset7;                    /*reserved*/
  251.     long                             resOffset8;                    /*reserved*/
  252.     short                             resLength1;                    /*reserved*/
  253.     short                             resLength2;                    /*reserved*/
  254.     short                             resLength3;                    /*reserved*/
  255.     short                             unTokenLength;                /*length of untoken table*/
  256.     short                             defPartsLength;                /*length of default number parts table*/
  257.     short                             whtSpListLength;            /*length of white space code list*/
  258.     short                             resLength7;                    /*reserved*/
  259.     short                             resLength8;                    /*reserved*/
  260. };
  261. typedef struct NItl4Rec NItl4Rec;
  262.  
  263. typedef NItl4Rec *NItl4Ptr;
  264. typedef NItl4Ptr *NItl4Handle;
  265. struct TableDirectoryRecord {
  266.     OSType                             tableSignature;                /*4 byte long table name */
  267.     unsigned long                     reserved;                    /*Reserved for internal use */
  268.     unsigned long                     tableStartOffset;            /*Table start offset in byte*/
  269.     unsigned long                     tableSize;                    /*Table size in byte*/
  270. };
  271. typedef struct TableDirectoryRecord TableDirectoryRecord;
  272.  
  273. struct Itl5Record {
  274.     Fixed                             versionNumber;                /*itl5 resource version number */
  275.     unsigned short                     numberOfTables;                /*Number of tables it contains */
  276.     unsigned short                     reserved[3];                /*Reserved for internal use */
  277.     TableDirectoryRecord             tableDirectory[1];            /*Table directory records */
  278. };
  279. typedef struct Itl5Record Itl5Record;
  280.  
  281. struct RuleBasedTrslRecord {
  282.     short                             sourceType;                    /*Transliterate target type for the LHS of the rule */
  283.     short                             targetType;                    /*Transliterate target type for the RHS of the rule */
  284.     short                             formatNumber;                /*Transliterate resource format number */
  285.     short                             propertyFlag;                /*Transliterate property flags */
  286.     short                             numberOfRules;                /*Number of rules following this field */
  287. };
  288. typedef struct RuleBasedTrslRecord RuleBasedTrslRecord;
  289.  
  290. struct ItlcRecord {
  291.     short                             itlcSystem;                    /*default system script*/
  292.     short                             itlcReserved;                /*reserved*/
  293.     SInt8                             itlcFontForce;                /*default font force flag*/
  294.     SInt8                             itlcIntlForce;                /*default intl force flag*/
  295.     SInt8                             itlcOldKybd;                /*MacPlus intl keybd flag*/
  296.     SInt8                             itlcFlags;                    /*general flags*/
  297.     short                             itlcIconOffset;                /*keyboard icon offset; not used in 7.0*/
  298.     SInt8                             itlcIconSide;                /*keyboard icon side; not used in 7.0*/
  299.     SInt8                             itlcIconRsvd;                /*rsvd for other icon info*/
  300.     short                             itlcRegionCode;                /*preferred verXxx code*/
  301.     short                             itlcSysFlags;                /*flags for setting system globals*/
  302.     SInt8                             itlcReserved4[32];            /*for future use*/
  303. };
  304. typedef struct ItlcRecord ItlcRecord;
  305.  
  306. struct ItlbRecord {
  307.     short                             itlbNumber;                    /*itl0 id number*/
  308.     short                             itlbDate;                    /*itl1 id number*/
  309.     short                             itlbSort;                    /*itl2 id number*/
  310.     short                             itlbFlags;                    /*Script flags*/
  311.     short                             itlbToken;                    /*itl4 id number*/
  312.     short                             itlbEncoding;                /*itl5 ID # (optional; char encoding)*/
  313.     short                             itlbLang;                    /*current language for script */
  314.     SInt8                             itlbNumRep;                    /*number representation code*/
  315.     SInt8                             itlbDateRep;                /*date representation code */
  316.     short                             itlbKeys;                    /*KCHR id number*/
  317.     short                             itlbIcon;                    /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
  318. };
  319. typedef struct ItlbRecord ItlbRecord;
  320.  
  321. /* New ItlbExtRecord structure for System 7.0 */
  322. struct ItlbExtRecord {
  323.     ItlbRecord                         base;                        /*un-extended ItlbRecord*/
  324.     long                             itlbLocalSize;                /*size of script's local record*/
  325.     short                             itlbMonoFond;                /*default monospace FOND ID*/
  326.     short                             itlbMonoSize;                /*default monospace font size*/
  327.     short                             itlbPrefFond;                /*preferred FOND ID*/
  328.     short                             itlbPrefSize;                /*preferred font size*/
  329.     short                             itlbSmallFond;                /*default small FOND ID*/
  330.     short                             itlbSmallSize;                /*default small font size*/
  331.     short                             itlbSysFond;                /*default system FOND ID*/
  332.     short                             itlbSysSize;                /*default system font size*/
  333.     short                             itlbAppFond;                /*default application FOND ID*/
  334.     short                             itlbAppSize;                /*default application font size*/
  335.     short                             itlbHelpFond;                /*default Help Mgr FOND ID*/
  336.     short                             itlbHelpSize;                /*default Help Mgr font size*/
  337.     Style                             itlbValidStyles;            /*set of valid styles for script*/
  338.     Style                             itlbAliasStyle;                /*style (set) to mark aliases*/
  339. };
  340. typedef struct ItlbExtRecord ItlbExtRecord;
  341.  
  342.  
  343. #if PRAGMA_ALIGN_SUPPORTED
  344. #pragma options align=reset
  345. #endif
  346.  
  347. #if PRAGMA_IMPORT_SUPPORTED
  348. #pragma import off
  349. #endif
  350.  
  351. #ifdef __cplusplus
  352. }
  353. #endif
  354.  
  355. #endif /* __INTLRESOURCES__ */
  356.  
  357.